package cn.wolfcode.car.business.mapper;

import cn.wolfcode.car.business.domain.Statement;
import cn.wolfcode.car.business.query.StatementQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StatementMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Statement record);

    Statement selectByPrimaryKey(Long id);

    List<Statement> selectAll();

    int updateByPrimaryKey(Statement record);

    /**
     *  分页查询
     * @param qo
     * @return
     */
    List<Statement> selectForList(StatementQuery qo);

    /**
     * 修改 isDelete 状态
     * @param id
     * @param isDelete
     */
    void updateIsDelById(@Param("id") Long id, @Param("isDelete") Integer isDelete);

    /**
     * 修改 结算单明细
     * @param statement
     */
    void updateDetailed(Statement statement);

    /**
     * 获取结算单
     * @param appointmentId
     * @return
     */
    Statement getByAppointmentId(Long appointmentId);
}